filename= ARGV[0]
startline=ARGV[1]
endline=ARGV[2]
pr=ARGV[3]
po=ARGV[4]

if po ==nil then
  po=''
end

linenum=1

crbat = File.new("pr_#{filename}","a+")

File.open(filename).each { |line|
  

 if (startline.to_i<=linenum && linenum<=endline.to_i) then

   crbat.puts pr+line.chomp+po
   
 end
 
 linenum=linenum+1

}